﻿namespace Practices.IdentityProvider {
    using System;
    using System.Collections.Generic;
    using System.IdentityModel;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.ServiceModel.Activation;
    using System.Text;
    using System.Xml.Linq;

    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class FederationMetadataService : IFederationMetadataService {
        ContosoSecurityTokenServiceConfiguration stsConfiguration;

        public FederationMetadataService(){
            stsConfiguration = new ContosoSecurityTokenServiceConfiguration();
        }

        public XElement FederationMetadata() {
            return this.stsConfiguration.GetFederationMetadata();
        }
    }
}
